word.dxl export no spelling no pagination

Can someone please tell me how to modify the word.dxl file such that it turns OFF spelling, grammar, and pagination before starting to export? Please include some error checking to see if word will oblige.

Thanks.

  • Louie

llandale - Tue Mar 02 17:04:17 EST 2010

Re: word.dxl export no spelling no pagination
doors36677 - Wed Mar 03 06:52:43 EST 2010

The old forum download had this code.

Re: word.dxl export no spelling no pagination
pete.kowalski - Wed Mar 03 10:27:58 EST 2010

To turn off spelling

code
void wordDisableCheckAsYouType(OleAutoObj foo)
{
// Turn off screen updating
checkRes(olePut(foo, cPropertyScreenUpdating, false))

// Get the Options Object
OleAutoObj objOptions = null
checkRes(oleGet(foo, cPropertyOptions, objOptions))

if (null(objOptions)){return}

// Get the current settings for the user
checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck))
checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck))

// Now turn off both
checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false))
checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false))

// Also turn off Auto Pagination
checkRes(olePut(objOptions, cPropertyPagination, false))
}
[/code]

Re: word.dxl export no spelling no pagination
pete.kowalski - Wed Mar 03 10:34:08 EST 2010

pete.kowalski - Wed Mar 03 10:27:58 EST 2010
To turn off spelling

code
void wordDisableCheckAsYouType(OleAutoObj foo)
{
// Turn off screen updating
checkRes(olePut(foo, cPropertyScreenUpdating, false))

// Get the Options Object
OleAutoObj objOptions = null
checkRes(oleGet(foo, cPropertyOptions, objOptions))

if (null(objOptions)){return}

// Get the current settings for the user
checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck))
checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck))

// Now turn off both
checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false))
checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false))

// Also turn off Auto Pagination
checkRes(olePut(objOptions, cPropertyPagination, false))
}
[/code]

Ignore my last post

To turn off these features you can use this function.
 

const string cPropertyCheckSpellingAsYouType =        "CheckSpellingAsYouType"
const string cPropertyCheckGrammarAsYouType =      "CheckGrammarAsYouType"
const string cPropertyPagination =                 "Pagination"
 
 
 
void wordDisableCheckAsYouType(OleAutoObj foo)
{
        // Turn off screen updating
        checkRes(olePut(foo, cPropertyScreenUpdating, false))
 
        // Get the Options Object
        leAutoObj objOptions = null
        checkRes(oleGet(foo, cPropertyOptions, objOptions))
 
        if (null(objOptions)){return}
 
        // Get the current settings for the user
        checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck))
        checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck))
 
        // Now turn off both
        checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false)) // turn off spelling
        checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false)) // turn off grammar checking
 
        // Also turn off Auto Pagination
        checkRes(olePut(objOptions, cPropertyPagination, false)) // turn off pagination
}

Re: word.dxl export no spelling no pagination
llandale - Wed Mar 03 16:39:22 EST 2010

pete.kowalski - Wed Mar 03 10:34:08 EST 2010

Ignore my last post

To turn off these features you can use this function.
 

const string cPropertyCheckSpellingAsYouType =        "CheckSpellingAsYouType"
const string cPropertyCheckGrammarAsYouType =      "CheckGrammarAsYouType"
const string cPropertyPagination =                 "Pagination"
 
 
 
void wordDisableCheckAsYouType(OleAutoObj foo)
{
        // Turn off screen updating
        checkRes(olePut(foo, cPropertyScreenUpdating, false))
 
        // Get the Options Object
        leAutoObj objOptions = null
        checkRes(oleGet(foo, cPropertyOptions, objOptions))
 
        if (null(objOptions)){return}
 
        // Get the current settings for the user
        checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck))
        checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck))
 
        // Now turn off both
        checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false)) // turn off spelling
        checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false)) // turn off grammar checking
 
        // Also turn off Auto Pagination
        checkRes(olePut(objOptions, cPropertyPagination, false)) // turn off pagination
}

These variables are undefined:
cPropertyOptions
wordDoAutoSpellCheck
wordDoAutoGrammarCheck

The call would go in function userExportCode(), after checking for objWord == null?

Forgive ignorance, but I don't see how you are getting the current settings.

  • Louie